<template>
  <div id="app">  
    <router-view />
  </div>
</template>

<script>
export default {
  name: 'App',
  mounted(){
    window.addEventListener('unload',this.saveState());
  },
  methods:{
    saveState(){
      // if(sessionStorage.getItem('isLogin')!=null){
        console.log(this.$store.state)
        sessionStorage.setItem('state',JSON.stringify(this.$store.state.user))
      // }
      // console.log(sessionStorage.getItem('state'))
      
     
    }
  }
}
</script>

<style>
</style>
